package my.sample.io.file;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class ReadFileToString {
	// private static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(ReadFileToString.class);
	
	public static void main(String[] args) throws IOException {
		
		    BufferedReader br = new BufferedReader(new FileReader("/tmp/input.txt"));
		    try {
		        StringBuilder sb = new StringBuilder();
		        String line = br.readLine();

		        while (line != null) {
		            sb.append(line);
		            sb.append("\n");
		            line = br.readLine();
		        }
		        System.out.println(sb.toString());
		    } finally {
		        br.close();
		    }
		
		
	}
}
